package com.sunfeng.springcloud.service;

import org.springframework.stereotype.Component;

/**
 *  当生产方服务不可用时 会走这里的降级处理   这里采用的客户端服务降级
 */
@Component
public class PaymentFallbackService implements PaymentHystrixService{
    @Override
    public String paymentInfo_OK(Integer id) {
        return " PaymentFallbackService paymentInfo_OK  error 服务降级";
    }

    @Override
    public String paymentInfo_TimeOut(Integer id) {
        return " PaymentFallbackService paymentInfo_TimeOut  error 服务降级";
    }

    @Override
    public String paymentInfo_Circuit(Integer id) {
        return " PaymentFallbackService paymentInfo_Circuit  error 服务熔断";
    }
}
